<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
	
%>
<c:set var="path" value="${pageContext.request.contextPath }" />
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="renderer" content="webkit">
<meta http-equiv="Cache-Control" content="no-siteapp" />
<title>竞技之星</title>
<link href="${path }/resource/css/scale-css.css" type="text/css" rel="stylesheet" />
<!--[if lt IE 8]>
    <meta http-equiv="refresh" content="0;ie.html" />
    <![endif]-->

<!-- 本框架基本脚本和样式 -->
<script type="text/javascript"
	src="${path }/resource/js/jquery-2.1.4.min.js"></script>
<script type="text/javascript"
	src="${path }/resource/js/systools/MBase.js"></script>
<script type="text/javascript" src="${path }/resource/js/scale.js"></script>
<style type="text/css">
	.xzbody{
		overflow:scroll;
		overflow-x:hidden;
	}
	.xzbg{
		background: url(${path }/resource/images/jjstar/downloadbg.png) no-repeat;
		background-size:100% 100%;
		background-position:center;
		width: 100%;
		height: 100%;
	}
	.azxz{
		text-align: center;
		margin-top: 80px;
	}
	.pgxz{
		text-align: center;
		margin-top: 80px;
	}
</style>
</head>

<body class="xzbody">
<div class="xzbg">
		<div style="height: 160px;">
			<div class="div-title"></div><br>
			<div class="sub-title" style="margin-top: -290px;margin-left: 260px;"></div>
		</div>
<!-- 		<div class="div-bg div-line-bg5"></div> -->
<%-- 		<div class="div-line-bg50 div-font-size1" id="tip">${tip}</div> --%>
<!-- 		<div class="div-line-bg120" > -->
		<div class="azxz" >
<!-- 			<span class="div-btn div-font-size2" onclick="downAndroid()"> -->
<!-- 				<span class="fa fa-android">安卓下载</span> -->
<!-- 			</span> -->
			<a><img alt="安卓下载" src="${path }/resource/images/jjstar/azxz.png" onclick="downAndroid()"></a>

		</div>
		<div class="pgxz">
<!-- 		<div class="div-line-bg120" style="margin-top: 80px;"> -->
<!-- 			<span class="div-btn div-font-size2" onclick="downApple()"> <span -->
<!-- 				class="fa fa-apple">苹果下载</span> -->
<!-- 			</span> -->
			<a><img alt="苹果下载" src="${path }/resource/images/jjstar/pgxz.png" onclick="downApple()"></a>
		</div>

	</div>
</body>
<script type="text/javascript">
	function downAndroid(){
		window.location.href = "http://www.jjstar.cc/client/downloadApk";
	}
	function downApple(){
		//window.location.href = "http://fir.im/c5en";
		//window.location.href = "https://appsto.re/cn/4rHYeb.i";
		window.location.href = "https://itunes.apple.com/us/app/jing-ji-zhi-xing-pao-de-kuai/id1154094200?l=zh&ls=1&mt=8";
	}
	function setImgWidth() {
		var wid = document.documentElement.clientWidth;
		var hig = document.documentElement.clientHeight;
		if(isPC) {
			var imgwid = (hig*72)/128;
			$('img').css("width", imgwid/2);
		} else {
			$('img').css("width", wid/2);
		}
	}
	window.onresize = function(){
		setImgWidth();
	}
	function IsPC() {
	    var userAgentInfo = navigator.userAgent;
	    var Agents = ["Android", "iPhone", "SymbianOS", "Windows Phone", "iPad", "iPod"];
	    var flag = true;
	    for (var v = 0; v < Agents.length; v++) {
	        if (userAgentInfo.indexOf(Agents[v]) > 0) {
	            flag = false;
	            break;
	        }
	    }
	    return flag;
	}
	var isPC = false;
	$().ready(function(){
		isPC = IsPC();
		if(IsPC()) {
			$(".xzbg").css("background-size", "auto 100%");
			$(".azxz").css("margin-top", "0");
			$("body").css("background-color", "#17181D");
		}
		
		setImgWidth();
		
		var tip = $("#tip").text();
		if(tip==""||tip==null){
			$("#tip").hide();
		}
		$.ajax({
		    type: "post",
		    url: "${path}/client/getCash",     
		    data: {"gameId":gameId,
		    		"account":account},    
		    success: function(data) {
		    	alert("申请成功！");
		    },
		    error: function(data) {
		    	alert("网络繁忙，请稍候再试！");
		    }
		    });
	});
</script>
</html>